<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增上报项目')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-db-edit" th:object="${baseReport}">
        <input id="idReport" name="parentId" type="hidden" th:field="*{idReport}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">上报项目：</label>
            <div class="col-sm-8">
                <input name="na" th:field="*{na}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">上报单位：</label>
            <div class="col-sm-8">
                <input name="naUnit" class="form-control" type="text" th:field="*{naUnit}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">跳转路径：</label>
            <div class="col-sm-8">
                <input name="url" class="form-control" type="text" th:field="*{url}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">责任人：</label>
            <div class="col-sm-8">
                <input name="naEmp" class="form-control" type="text" th:field="*{naEmp}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">有效期：</label>
            <div class="col-sm-8">
                <input name="monthBegin" class="form-control" type="text" placeholder="yyyy-MM" th:field="*{monthBegin}">~
                <input name="monthEnd" class="form-control" type="text" placeholder="yyyy-MM" th:field="*{monthEnd}">
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
    var prefix = ctx + "base/report"
    $("#form-db-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-db-edit').serialize());
            $.modal.close();
        }
    }
</script>
</body>
</html>